package com.sosee.cgfw.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.sosee.cgfw.R;
import com.umeng.analytics.MobclickAgent;

/**
 * Created by huchuanpc on 2016/3/12.
 * //显示dhub界面
 */
public class WebActivity extends Activity {
    WebView wv;
    private String url;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dhub);
        initView();
    }


    @Override
    protected void onResume() {
        super.onResume();
        MobclickAgent.onResume(this);
    }

    @Override
    protected void onPause() {
        super.onPause();
        MobclickAgent.onPause(this);
    }

    public void initView(){
        url=getIntent().getStringExtra("url");
        wv = (WebView) findViewById(R.id.wv);
        WebSettings settings = wv.getSettings();
        settings.setJavaScriptEnabled(true);
        settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
        settings.setUseWideViewPort(true);
        wv.setWebViewClient(new WebViewClient() {

        });
        wv.loadUrl(url);//加载url
    }


    public void back(View view){
        finish();
    }



}
